/**
 *Copyright (c) 2003, 2018, UMF and/or its affiliates. All rights reserved.
 */
package com.umf.b2b.model.order;

import com.umf.b2b.MerchantBaseRequest;
import com.umpay.dto.UMFResponse.Message;
import com.umpay.util.UMFUtil;

import java.util.List;

/**
<p>Title:ConsumeFinishOrder</p>  
<p>Description: ��������-������ɣ����ڵ���������ɺ�ⵣ��</p>
 */
public class ConsumeFinishOrder extends MerchantBaseRequest {

	private String notify_url;
	private String trade_no;////*����ش� �������ף���������ƽ̨���������󷵻ص�����ƽ̨��ˮ��
	
	//����split_order_id��split_mer_date�����������գ����ʾ������Ѷ����ķ����ӵ�ȫ�������������������Ӧ�ķ����ӵ�����Ϣ�������Դ���ķ����ӵ�������������������ӵ���Ҫ���ñ��ӿ����������
	
	private String split_order_id;//�˲������������Ҫ�Ը������ӵ�����˴����뱾�����봴������ʱƽ̨��split_cmd����ķ�����ˮ��
	private String split_mer_date;//��������ʱƽ̨��split_cmd����ķ�������
	private String url = "/consume/finishOrder";
	
	private List<SplitResult> split_result;//[��Ӧ����]

	@Override
	public String getRequestUrl() {
		return baseUrl + url;
	}

	@Override
	public ConsumeFinishOrder doRequest() throws Exception {
		Message<ConsumeFinishOrder> response = UMFUtil.post(createAPIContext(), this,ConsumeFinishOrder.class);
		MerchantBaseRequest baseResult = convertResult(response, ConsumeFinishOrder.class);
		if(baseResult == null)
			return null;
		return (ConsumeFinishOrder)baseResult;
	}

	public String getMer_id() {
		return mer_id;
	}

	public void setMer_id(String mer_id) {
		this.mer_id = mer_id;
	}

	public String getNotify_url() {
		return notify_url;
	}

	public void setNotify_url(String notify_url) {
		this.notify_url = notify_url;
	}

	public String getTrade_no() {
		return trade_no;
	}

	public void setTrade_no(String trade_no) {
		this.trade_no = trade_no;
	}

	public String getSplit_order_id() {
		return split_order_id;
	}

	public void setSplit_order_id(String split_order_id) {
		this.split_order_id = split_order_id;
	}

	public String getSplit_mer_date() {
		return split_mer_date;
	}

	public void setSplit_mer_date(String split_mer_date) {
		this.split_mer_date = split_mer_date;
	}

	public List<SplitResult> getSplit_result() {
		return split_result;
	}

	public void setSplit_result(List<SplitResult> split_result) {
		this.split_result = split_result;
	}

	@Override
	public String toString() {
		StringBuilder builder = new StringBuilder();
		builder.append("ConsumeFinishOrder [notify_url=");
		builder.append(notify_url);
		builder.append(", trade_no=");
		builder.append(trade_no);
		builder.append(", split_order_id=");
		builder.append(split_order_id);
		builder.append(", split_mer_date=");
		builder.append(split_mer_date);
		builder.append(", url=");
		builder.append(url);
		builder.append(", split_result=");
		builder.append(split_result);
		builder.append(", version=");
		builder.append(version);
		builder.append(", mer_id=");
		builder.append(mer_id);
		builder.append(", ret_code=");
		builder.append(ret_code);
		builder.append(", ret_msg=");
		builder.append(ret_msg);
		builder.append(", links=");
		builder.append(links);
		builder.append("]");
		return builder.toString();
	}

}
